package org.shj.hadoop.rpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RPC.Server;

public class RPCServer implements Bizable{
	
	public String sayHi(String user){
		return "Hi " + user;
	}

	public static void main(String[] args) throws Exception {
		Configuration conf = new Configuration();
		Server server = new RPC.Builder(conf).setProtocol(Bizable.class)
						.setInstance(new RPCServer()).setBindAddress("192.168.56.1")
						.setPort(10240).build();
		server.start();
		
	}

}
